<template>
 <div>
    <img :src="$attrs.src"  
          
          @click="previewBtn($attrs.src)"
          :style="{height: $attrs.height+'px',width: $attrs.width==375?'100%':($attrs.width+'px'),objectFit: 'fill',padding: '10px'}"
      >
    <!-- <img :src="$attrs.src"  v-show="!$attrs.isViweImg" :style="{height: $attrs.height+'px',width: $attrs.width==375?'100%':($attrs.width+'px'),objectFit: 'fill'}"> -->
 </div>
</template>
<script>
import { ImagePreview } from 'vant';
export default {
  data(){
    return {

    }
  },
  methods:{
    previewBtn(src){
      if(this.$attrs.isViweImg){
        ImagePreview({
        images:[src],
        closeable: true
      });
      }
     
    }
  }
}
</script>
<style scoped>
  img[src=""]{
  opacity: 0;
}
</style>
